package cn.edu.hstc.wm.ui.fragment;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import cn.edu.hstc.wm.R;
import cn.edu.hstc.wm.ui.base.BaseFragment;
import cn.edu.hstc.wm.utils.LogUtil;

/**
 * 正在加载中的界面
 * 
 * @author CX
 * @since 2014-01-01
 */
public class LoadingFragment extends BaseFragment {

	private static final String TAG = LoadingFragment.class.getName();

	private static LoadingFragment sFragment = null;

	/**
	 * 获取LoadingFragment实例的方法
	 * 
	 * @param bundle
	 * @return
	 */
	public static LoadingFragment getInstance(Bundle bundle) {
//		if (sFragment == null) {
//			sFragment = new LoadingFragment();
//		}
//		sFragment.setArguments(bundle);
//		return sFragment;
		return new LoadingFragment();
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		LogUtil.i(TAG, "onActivityCreated");
		super.onActivityCreated(savedInstanceState);
	}

	@Override
	public void onAttach(Activity activity) {
		LogUtil.i(TAG, "onAttach");
		super.onAttach(activity);
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		LogUtil.i(TAG, "onCreateView");
		return inflater.inflate(R.layout.loading_fragment, null);
	}

}
